<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/barcode/Bas_Label.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/barcode/Bas_Label.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "barcode/Bas_Label",
        setup() {
            const table = ref({
                key: "LabelId",
                footer: "Foots",
                cnName: "标签模板管理",
                name: "barcode/Bas_Label",
                newTabEdit: true,
                url: "/Bas_Label/",
                sortName: "LabelId"
            });
            const editFormFields = ref({"LabelName":"","LabelType":"","WidthSize":"","HeightSize":"","DocumentType":"","IsCommon":"","Remarks":""});
            const editFormOptions = ref([[{"title":"标签名称","required":true,"field":"LabelName"},
                               {"dataKey":"BASE_BarCodeType","data":[],"title":"标签类型","required":true,"field":"LabelType","type":"select"}],
                              [{"title":"标签尺寸(mm)宽","required":true,"field":"WidthSize","type":"number"},
                               {"title":"标签尺寸(mm)高","required":true,"field":"HeightSize","type":"number"}],
                              [{"dataKey":"Base_DocumentType","data":[],"title":"档案类型","required":true,"field":"DocumentType","type":"select"},
                               {"dataKey":"enabled","data":[],"title":"是否通用","field":"IsCommon","disabled":true,"type":"switch"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"DocumentType":"","LabelName":""});
            const searchFormOptions = ref([[{"dataKey":"Base_DocumentType","data":[],"title":"档案类型","field":"DocumentType","type":"select"},{"title":"标签名称","field":"LabelName","type":"like"}]]);
            const columns = ref([{field:"Createtor",title:"创建人",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"LabelId",title:"LabelId",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Level",title:"标签层级",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"DocumentType",title:"档案类型",type:"int",bind:{ key:"Base_DocumentType",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Version",title:"标签版本号",type:"string",width:180,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"LabelName",title:"标签名称",type:"string",width:150,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Content",title:"设计内容",type:"string",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"FileId",title:"文件",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Zpl",title:"ZPL指令",type:"string",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"LabelType",title:"标签类型",type:"int",bind:{ key:"BASE_BarCodeType",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsCommon",title:"是否通用",type:"int",bind:{ key:"enabled",data:[]},width:110,hidden:true,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"WidthSize",title:"标签尺寸(mm)宽",type:"string",width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"HeightSize",title:"标签尺寸(mm)高",type:"string",width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"CreateId",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"ModifyId",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
